home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / pvm34b3.zip / pvm34b3 / pvm3 / libfpvm / WIN32 / Pvmfaddhost.c < prev    next >
C/C++ Source or Header  |  1997-07-22  |  567b  |  33 lines

  1.  
  2. /* $Id: Pvmfaddhost.c,v 1.1 1997/06/27 16:13:46 pvmsrc Exp $ */
  3.  
  4. #ifdef WIN32
  5. #include "..\..\src\pvmwin.h"
  6. #endif
  7. #include "pvm3.h"
  8. #include "pvm_consts.h"
  9.  
  10. void __fortran
  11. PVMFADDHOST (host_ptr, info, host_len)
  12. char * host_ptr; int host_len;
  13. int *info;
  14. {
  15.     int  dtid;
  16.     char thost[MAX_HOST_NAME + 1];
  17.     char *ptr = thost;
  18.  
  19.     /*
  20.      * Copy the host name to make sure there's
  21.      * a NUL at the end.
  22.      */
  23.     if (ftocstr(thost, sizeof(thost), host_ptr, host_len)) {
  24.         *info = PvmBadParam;
  25.         return;
  26.     }
  27.  
  28.     *info = pvm_addhosts(&ptr, 1, &dtid);
  29.     if (*info >= 0)
  30.         *info = dtid;
  31. }
  32.  
  33.